import 'package:enterprise_v6_app/app/components/custom_app_bar.dart';
import 'package:enterprise_v6_app/app/components/custom_modele/custom_card.dart';
import 'package:enterprise_v6_app/app/components/custom_modele/custom_row_purple.dart';
import 'package:enterprise_v6_app/app/components/custom_modele/custom_row_title.dart';
import 'package:enterprise_v6_app/app/core/core.dart';
import 'package:enterprise_v6_app/app/data/entities/application/standing_book/receipt_info_entity.dart';

/// 作业人员
class OperatorManPage extends StatelessWidget {
  const OperatorManPage({super.key});

  @override
  Widget build(BuildContext context) {
    final ReceiptInfoEntity receiptInfoEntity = Get.arguments as ReceiptInfoEntity;
    return Scaffold(
      backgroundColor: AppColors.bg_color_grey,
      appBar: CustomAppBar(
        titleText: '作业人员',
      ),
      body: Container(
        padding: EdgeInsets.all(16.w),
        child: ListView.separated(
          itemCount: receiptInfoEntity.receiptInfo!.operatorLists!.length,
          itemBuilder: (context,index) {
            return CustomCard(
              title: '作业人员: ${receiptInfoEntity.receiptInfo!.operatorLists![index].operatorUserName}',
              content: Column(
                children: [
                   CustomRowPurple(
                    title: '证书名称：',
                    content: receiptInfoEntity.receiptInfo!.operatorLists![index].operatorCertificateId.toString(),
                  ),
                  CustomRowTitle(
                    title: '证书编号：',
                    content: '${receiptInfoEntity.receiptInfo!.operatorLists![index].operatorCertificateId}',
                  ),
                  const CustomRowTitle(
                    title: '培训记录：',
                    content: '2022年10月11日参加过动火作业培训\n2022年10月11日参加过动火作业培训\n2022年10月11日参加过动火作业培训',
                  ),
                ],
              ),
            );
          },
          separatorBuilder: (context,index) {
            return SizedBox(height: 16.w,);
          }
        ),
      ),
    );
  }
}
